export default function(wxImg) {
	return new Promise((resolve, reject) => {
		uni.getImageInfo({
			src: wxImg,
			success: (r) => {
				// console.log(r)
				let imgType = r.type
				uni.getFileSystemManager().readFile({
					filePath: wxImg, 
					encoding: "base64", 
					success: res => { 
						let u = 'data:image/' + imgType + ';base64,' + res.data
						resolve(u)
					},
					fail: err => {
						resolve(err)
					}
				})
			},
			fail: (e) => {
				resolve(e)
			}
		})
	})
}
